Class ErrorHandlerTest

java.lang.Object
com.fsf.news.handler.ErrorHandlerTest

@ExtendWith(org.mockito.junit.jupiter.MockitoExtension.class) class ErrorHandlerTest extends Object
Unit tests for ErrorHandler.
  • Field Details

    • errorHandler

      @InjectMocks com.fsf.news.handler.ErrorHandler errorHandler
    • request

      @Mock play.mvc.Http.RequestHeader request
    • exception

      @Mock com.fsf.news.exception.ResponseProcessingException exception
    • otherException

      @Mock Exception otherException
    • result

      @Mock play.mvc.Result result
  • Constructor Details

    • ErrorHandlerTest

      ErrorHandlerTest()
  • Method Details

    • testOnClientError

      @Test void testOnClientError()
      Tests onClientError.
    • testOnServerErrorExceptionWithResponseStatus

      @Test void testOnServerErrorExceptionWithResponseStatus()
      Tests onServerError with ResponseStatus annotation.
    • testOnServerErrorOtherException

      @Test void testOnServerErrorOtherException()
      Tests onServerError with other exception.